Readme
Example Summary
- Flash BSL is developed to provide BSL features in a device not having ROM BSL.
- The Memory Section is altered to achieve this.(refer mspm0c1104.cmd)
- Flash Bootloader supports programming / verifying data in the memory.
- It can be invoked in any of the three way as follows:
- No Application at APP START
- BSL PIN Inovation
- Application based invocation
- It supports the following major functions
- Program data
- Get Device info
- Flash memory erase
- Readback data
- CRC verification
- Start Application
- One of UART/I2C interface can be used to communicate with the Host.
- By default flash BSL occupies the first 6 KB of flash.
- This region is static write protected using bootcode user configuration. ( refer “boot_config.c” )
- Once this image is loaded to the device, the FLash Bootloader will be active. To revert the device to default state SWD_Factory_Reset command has to be used.
- Users can alter the interface pins/ invoke pin in bootloader user configuration (refer boot_config.c)
- The user application is expected to start at 0x1800 by default.
Flash BSL feature selection
- The following features are Macro based and can be enabled/disabled to save memory consumption (refer “flashBSL_modules.h”)
- UART_INTERFACE
- I2C_INTERFACE
- BSL_PIN_INVOKE
- BSL_BLANK_FLASH_INVOKE
- BSL_CMD_FLASH_RANGE_ERASE
- BSL_CMD_MASS_ERASE
- BSL_CMD_MEMORY_READ_BACK
- BSL_CMD_STANDALONE_VERIFICATION
- BSL_CMD_CHANGE_BAUDRATE
- BSL_CMD_GET_IDENTITY
- BSL_TIMEOUT
NOTE:
- Always make sure to perform factory reset on device before loading FlashBSL example to avoid Lockout scenarios
- By enabling/ disabling features, the RAM buffer size for BSL communication and Flash start address for Application are altered. The values are to be updated in
flash_bsl_defines.haccordingly - While creating flash bootloader make sure that, flash bootloader is static write protected. Otherwise there are chances for device to get locked during the boot loading process.
For more details on BSL communication interface refer to BSL User Guide.
Peripherals & Pin Assignments
| Peripheral | Pin | Function |
|---|---|---|
| DEBUGSS | PA20 | Debug Clock |
| DEBUGSS | PA19 | Debug Data In Out |
| UART0 | PA24 | RX Pin |
| UART0 | PA27 | TX Pin |
| I2C0 | PA0 | I2C Serial Data line (SDA) |
| I2C0 | PA11 | I2C Serial Clock line (SCL) |
BoosterPacks, Board Resources & Jumper Settings
Visit LP_MSPM0C1104 for LaunchPad information, including user guide and hardware files.
| Pin | Peripheral | Function | LaunchPad Pin | LaunchPad Settings |
|---|---|---|---|---|
| PA20 | DEBUGSS | SWCLK | N/A |
|
| PA19 | DEBUGSS | SWDIO | N/A |
|
| PA0 | I2C0 | SDA | J1_10 |
|
| PA11 | I2C0 | SCL | J1_9 |
|
| PA26 | UART0 | RX | J1_3 |
|
| PA27 | UART0 | TX | J1_4 |
|
Device Migration Recommendations
This project was developed for a superset device included in the LP_MSPM0C1104 LaunchPad. Please visit the CCS User’s Guide for information about migrating to other MSPM0 devices.
Example Usage
Enable only the required BSL functionalities in flash_bsl_modules.h Connect UART_RX and UART_TX or I2C_SDA and I2C SCL with the BSL Host (any microcontroller with UART/I2C respectively). Compile, load the example. Create BSL invocation condition using BSL Invoke pin or any other invocation methods. Send GetDeviceInfo command from the host. Device should respond back with the version information and SRAM buffer space available. Similarly Send erase, program, verification commands to program data in the memory.